package com.bestcem.xm.common.core.constant;

/**
 * 请求错误常量类，错误码必须落于1~99之间，包含1和99
 * <p>
 * 处理诸如：AccessToken缺失或不存在、请求签名错误、请求参数不足、...等请求错误。
 *
 * @author ympan <yuming.pan@idiaoyan.com>
 * @version v3.0
 * @date 2021/8/17 11:30
 */
public class ReqErrorCodeConstants {

    private ReqErrorCodeConstants() {
    }

    public static final int CODE_MIN = 0;
    public static final int CODE_MAX = 99;

    /**
     * Token缺失
     */
    public static final int TOKEN_LOST = CODE_MIN + 2;

    /**
     * 签名错误
     */
    public static final int SIGN_ERROR = CODE_MIN + 3;

    /**
     * 参数缺失
     */
    public static final int PARAM_LOST = CODE_MIN + 4;

    /**
     * 参数格式错误
     */
    public static final int PARAM_FORMAT = CODE_MIN + 5;

    /**
     * 无效Token
     */
    public static final int INVALID_TOKEN = CODE_MIN + 6;

    /**
     * 参数超出合法范围
     */
    public static final int PARAM_RANGE = CODE_MIN + 7;

    /**
     * 无效的时间戳
     */
    public static final int INVALID_TS = CODE_MIN + 8;

    /**
     * 无效的图片格式
     */
    public static final int IMAGE_FORMAT = CODE_MIN + 9;

    /**
     * 无效的邮箱设置
     */
    public static final int INVALID_EMAIL = CODE_MIN + 10;

    /**
     * 禁用参数
     */
    public static final int PARAM_FORBIDEN = CODE_MIN + 11;

    /**
     * 参数解密失败
     */
    public static final int PARAM_DECRYPT_ERROR = CODE_MIN + 12;

    /**
     * 导出异常
     */
    public static final int EXPORT_ERROR = CODE_MIN + 13;

    /**
     * xss异常
     */
    public static final int XSS_ERROR = CODE_MIN + 14;

    /**
     * 参数类型错误
     */
    public static final int PARAM_TYPE_ERROR = CODE_MIN + 15;

    /**
     * 文件类型错误
     */
    public static final int FILE_TYPE_ERROR = CODE_MIN + 31;
}
    